<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>GL.FBO</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/BBox.html">BBox</a></li>
                                <li><a href="../classes/geo.html">geo</a></li>
                                <li><a href="../classes/GL.html">GL</a></li>
                                <li><a href="../classes/gl.html">gl</a></li>
                                <li><a href="../classes/GL.Buffer.html">GL.Buffer</a></li>
                                <li><a href="../classes/GL.FBO.html">GL.FBO</a></li>
                                <li><a href="../classes/GL.Indexer.html">GL.Indexer</a></li>
                                <li><a href="../classes/GL.Mesh.html">GL.Mesh</a></li>
                                <li><a href="../classes/GL.Octree.html">GL.Octree</a></li>
                                <li><a href="../classes/GL.Shader.html">GL.Shader</a></li>
                                <li><a href="../classes/GL.Texture.html">GL.Texture</a></li>
                                <li><a href="../classes/LEvent.html">LEvent</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>GL.FBO Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_fbo.js.html#l1"><code>..&#x2F;src&#x2F;fbo.js:1</code></a>
        </div>


</div>


<div class="box intro">
    <p>FBO for FrameBufferObjects, FBOs are used to store the render inside one or several textures
Supports multibuffer and depthbuffer texture, useful for deferred rendering</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_GL.FBO" class="method item">
    <h3 class="name"><code>GL.FBO</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>color_textures</code>
                </li>
                <li class="arg">
                        <code>depth_texture</code>
                </li>
                <li class="arg">
                        <code>stencil</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_fbo.js.html#l1"><code>..&#x2F;src&#x2F;fbo.js:1</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">color_textures</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>an array containing the color textures, if not supplied a render buffer will be used</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">depth_texture</code>
                        <span class="type"><a href="../classes/GL.Texture.html" class="crosslink">GL.Texture</a></span>


                    <div class="param-description">
                        <p>the depth texture, if not supplied a render buffer will be used</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">stencil</code>
                        <span class="type">Bool</span>


                    <div class="param-description">
                        <p>create a stencil buffer?</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_bind">bind</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTextures">setTextures</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_unbind">unbind</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_update">update</a>

                            </li>
                    </ul>
                </div>



        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_bind" class="method item">
    <h3 class="name"><code>bind</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>keep_old</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_fbo.js.html#l279"><code>..&#x2F;src&#x2F;fbo.js:279</code></a>
        </p>



    </div>

    <div class="description">
        <p>Enables this FBO (from now on all the render will be stored in the textures attached to this FBO
It stores the previous viewport to restore it afterwards, and changes it to full FBO size</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">keep_old</code>
                        <span class="type">Boolean</span>


                    <div class="param-description">
                        <p>keeps the previous FBO is one was attached to restore it afterwards</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTextures" class="method item">
    <h3 class="name"><code>setTextures</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>color_textures</code>
                </li>
                <li class="arg">
                        <code>depth_texture</code>
                </li>
                <li class="arg">
                        <code>skip_disable</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_fbo.js.html#l41"><code>..&#x2F;src&#x2F;fbo.js:41</code></a>
        </p>



    </div>

    <div class="description">
        <p>Changes the textures binded to this FBO</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">color_textures</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>an array containing the color textures, if not supplied a render buffer will be used</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">depth_texture</code>
                        <span class="type"><a href="../classes/GL.Texture.html" class="crosslink">GL.Texture</a></span>


                    <div class="param-description">
                        <p>the depth texture, if not supplied a render buffer will be used</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">skip_disable</code>
                        <span class="type">Boolean</span>


                    <div class="param-description">
                        <p>it doenst try to go back to the previous FBO enabled in case there was one</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_unbind" class="method item">
    <h3 class="name"><code>unbind</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_fbo.js.html#l308"><code>..&#x2F;src&#x2F;fbo.js:308</code></a>
        </p>



    </div>

    <div class="description">
        <p>Disables this FBO, if it was binded with keep_old then the old FBO is enabled, otherwise it will render to the screen
Restores viewport to previous</p>

    </div>




</div>
<div id="method_update" class="method item">
    <h3 class="name"><code>update</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>skip_disable</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_fbo.js.html#l103"><code>..&#x2F;src&#x2F;fbo.js:103</code></a>
        </p>



    </div>

    <div class="description">
        <p>Updates the FBO with the new set of textures and buffers</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">skip_disable</code>
                        <span class="type">Boolean</span>


                    <div class="param-description">
                        <p>it doenst try to go back to the previous FBO enabled in case there was one</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>



    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
